﻿#include "../../ctlColorDefine.h"

namespace swui
{
	void ctlStyleSolid::set(_subType subType)
	{
		smooth.enterLeave = 1000;
		switch(subType)
		{
		case black:
			border.leave = 0xff626262;
			border.stay = 0xff38a4ff;
			border.down = border.stay;
			border.disenable = border.leave;
			fill.disenable = 0xffb2b2b2;
			fill.down = 0xff3b3b4a;
			fill.leave = 0xff252525;
			fill.stay = 0xff3a3a3a;
			selectText.leave = selectText.stay = selectText.down =
				text.leave = text.stay = text.down = 0xffb2b2b2;
			text.disenable = selectText.disenable = 0xff777777;

			selectFill.disenable = fill.disenable; 
			selectFill.down = fill.down;
			selectBorder.disenable = border.disenable; 
			selectBorder.down = border.down;
			crSelectedFlag = 0xff000000;
			crDisenabledSelectedFlag = 0xff888888;
			selectBorder.leave = border.leave; selectBorder.stay = border.stay;
			selectFill.leave = fill.leave; selectFill.stay = fill.stay;
			break;
		case common:
			border.leave = 0xff666666;
			border.stay = 0xff38a4ff;
			border.down = border.stay;
			border.disenable = 0xff777777;
			fill.disenable = 0xffb2b2b2;
			fill.down = 0xffc8f0ff;
			fill.leave = 0xfff2f2f2;
			fill.stay = fill.leave;
			selectText.leave = selectText.stay = selectText.down =
				text.leave = text.stay = text.down = 0xff000000;
			text.disenable = selectText.disenable = 0xff777777;
				
			selectFill.disenable = fill.disenable; selectFill.down = fill.down;
			selectBorder.disenable = border.disenable; selectBorder.down = border.down;
			crSelectedFlag = 0xff000000;
			crDisenabledSelectedFlag = 0xff888888;
			selectBorder.leave = border.leave; selectBorder.stay = border.stay;
			selectFill.leave = fill.leave; selectFill.stay = fill.stay;
			break;
		}
		subStyle = subType;
	}
	void ctlStyleEdit::set(_subType subType)
	{
		textLeave = 0xff000000;
		textSelected = 0xffffffff;
		textDisenable = 0xff999999;
		selectBar = 0xff3297fd;
		caret = 0xff000000;
		subStyle = subType;
	}
	void ctlStyleList::set(_subType subType)
	{
		switch(subType)
		{
		case common:
			textColor = 0xff000000;
			selectTextColor = 0xffffffff;
			selectFill.set(0xff3297fd, 0xff3297fd);
			break;
		case gcommon:
			set(common);
			selectFill.set(0xff3297fd, 0xff0078c4);
			break;
		case lgcommon:
			set(common);
			selectTextColor = 0xff000000;
			selectFill.set(0xffe2fefe, 0xffa2dafe);
			break;
		case orange:
			set(common);
			selectFill.set(0xffeeac00, 0xffeeac00);
			break;
		case gorange:
			set(common);
			selectFill.set(0xfffdaf62, 0xfff47745);
			break;
		case lgorange:
			set(lgcommon);
			selectFill.set(0xfffdb772, 0xfff48f55);
			break;
		}
		subStyle = subType;
	}
} //namesapce control
